<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCheckItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('check_items', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('goods_category_id')->default('0')->nullable()->comment('检测类目');
            $table->string('name')->default('')->comment('项目名称');
            $table->text('description')->nullable()->comment('描述');
            $table->mediumText('content')->nullable()->comment('图文');
            $table->decimal('original_price')->default(0)->nullable()->comment('原价');
            $table->decimal('price')->default(0)->nullable()->comment('现价');
            $table->integer('is_selected')->default('0')->nullable()->comment('首页精选');
            $table->integer('status')->default('0')->comment('状态');
            $table->integer('order')->default('0')->comment('排序');
            $table->integer('creator_id')->default('0')->comment('创建人');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('check_items');
    }
}
